package com.ai.wxy.spring.jpa.sys.convert;

import com.ai.spring.common.convert.EntityConverter;
import com.ai.wxy.spring.jpa.sys.dto.SysConfDTO;
import com.ai.wxy.spring.jpa.sys.entity.SysConf;
import com.ai.wxy.spring.service.api.dto.ServiceConf;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.ReportingPolicy;

/**
 * 请求服务接口配置Entity与DTO转换
 *
 * @author 石头
 * @Date 2019/11/19
 * @Version 1.0
 **/
@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface SysConfDTOConvert extends EntityConverter<SysConfDTO,SysConf> {
    @Mappings({
            @Mapping(target = "requestId",source = "sysCode"),
            @Mapping(target = "serviceId",source = "svcId"),
            @Mapping(target = "serviceMethod",source = "svcMethod"),
            @Mapping(target = "scope",source = "reqScope"),
    })
    ServiceConf toServiceConf(SysConf sysConf);
}
